<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">




  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="直播,">










<meta name="description" content="直播在互联网中已经成为一个必不可少的东西，作为了一家互联公司直播当然也少不了了，目前直播在牛牛软件中主要功能是教育跟宣传作用。 内容 直播构成 直播流程 web中直播技术 hls协议 rtmp协议 hls与rtmp对比   实践 安装nginx、nginx-rtmp-module、FFmpeg（以下操作均在mac下进行） nginx.conf配置文件，配置RTMP、HLS 重启nginx 查看端口">
<meta name="keywords" content="直播">
<meta property="og:type" content="article">
<meta property="og:title" content="直播理论与实践">
<meta property="og:url" content="http://blog.xiaowuzi.info/2017/12/01/直播理论与实践/index.html">
<meta property="og:site_name" content="小武子博客">
<meta property="og:description" content="直播在互联网中已经成为一个必不可少的东西，作为了一家互联公司直播当然也少不了了，目前直播在牛牛软件中主要功能是教育跟宣传作用。 内容 直播构成 直播流程 web中直播技术 hls协议 rtmp协议 hls与rtmp对比   实践 安装nginx、nginx-rtmp-module、FFmpeg（以下操作均在mac下进行） nginx.conf配置文件，配置RTMP、HLS 重启nginx 查看端口">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/c19343ac6b031af7s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/2d4844429b6c24c5s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/ebf24281ef5b0221s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/764764-551e7aa6c8f2b86e.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/aed1d13465cd5422s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/edf1708baf6fbc90s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/WX20180126-111328@2x.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/0b20b027406625d2s.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/fbd49eed2bd3f92es.png">
<meta property="og:image" content="http://blog.xiaowuzi.info/images/live/14e622f03c4a9193s.png">
<meta property="og:updated_time" content="2018-04-08T03:49:17.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="直播理论与实践">
<meta name="twitter:description" content="直播在互联网中已经成为一个必不可少的东西，作为了一家互联公司直播当然也少不了了，目前直播在牛牛软件中主要功能是教育跟宣传作用。 内容 直播构成 直播流程 web中直播技术 hls协议 rtmp协议 hls与rtmp对比   实践 安装nginx、nginx-rtmp-module、FFmpeg（以下操作均在mac下进行） nginx.conf配置文件，配置RTMP、HLS 重启nginx 查看端口">
<meta name="twitter:image" content="http://blog.xiaowuzi.info/images/live/c19343ac6b031af7s.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://blog.xiaowuzi.info/2017/12/01/直播理论与实践/">





  <title>直播理论与实践 | 小武子博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">小武子博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://blog.xiaowuzi.info/2017/12/01/直播理论与实践/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Tony">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="小武子博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">直播理论与实践</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-12-01T15:08:40+08:00">
                2017-12-01
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/实践/" itemprop="url" rel="index">
                    <span itemprop="name">实践</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>直播在互联网中已经成为一个必不可少的东西，作为了一家互联公司直播当然也少不了了，目前直播在牛牛软件中主要功能是教育跟宣传作用。</p>
<h2 id="内容"><a href="#内容" class="headerlink" title="内容"></a>内容</h2><ol>
<li>直播构成</li>
<li>直播流程</li>
<li>web中直播技术<ul>
<li>hls协议</li>
<li>rtmp协议</li>
<li>hls与rtmp对比</li>
</ul>
</li>
<li>实践<ul>
<li>安装nginx、nginx-rtmp-module、FFmpeg（以下操作均在mac下进行）</li>
<li>nginx.conf配置文件，配置RTMP、HLS</li>
<li>重启nginx</li>
<li>查看端口是否启动</li>
<li>FFmpeg执行命令</li>
<li>代码</li>
<li>效果</li>
</ul>
</li>
<li>直播中遇到坑</li>
<li>总结</li>
</ol>
<h2 id="直播构成（使用角色）"><a href="#直播构成（使用角色）" class="headerlink" title="直播构成（使用角色）"></a>直播构成（使用角色）</h2><p><img src="/images/live/c19343ac6b031af7s.png" alt="Markdown"></p>
<a id="more"></a>
<p>目前牛牛支持情况：</p>
<p>移动牛牛（安卓、IOS）主播端只支持摄像头直播，观众端支持展示</p>
<p>PC牛牛主播端支持摄像头直播、录屏直播、摄像头+录屏直播，观众端支持展示</p>
<p>MAC牛牛跟web端主播端不支持，观众端支持展示</p>
<h2 id="直播流程"><a href="#直播流程" class="headerlink" title="直播流程"></a>直播流程</h2><p>视频直播，可以分为 采集，前处理，编码，传输，解码，渲染 这几个环节</p>
<p>采集，一般是由客户端（IOS、安卓、PC或其它工具，如OBS）完成的，iOS是比较简单的，Android则要做些机型适配工作，PC最麻烦各种奇葩摄像头驱动，当然这些问题，腾讯云已经帮我们处理好了，呵呵。</p>
<p>前处理，主要是处理直播美颜，美颜算法需要用到GPU编程，需要懂图像处理算法的人，没有好的开源实现，要自己参考论文去研究。难点不在于美颜效果，而在于GPU占用和美颜效果之间找平衡。</p>
<p>编码，肯定要采用硬编码，软编码720p完全没希望，勉强能编码也会导致CPU过热烫到摄像头。编码要在分辨率，帧率，码率，GOP等参数设计上找到最佳平衡点。</p>
<p>传输，一般交给了CDN服务商。</p>
<p>解码，是对之前编码的操作，进行解码，在web里需要解码是hls。</p>
<p>渲染，主要用播放器来解决，web中常用到的播放器有video.js，目前我们使用是腾讯云播放器。</p>
<p>其实一个完成直播，远远不上面这几个环节，下面是腾讯云直播方案的整个流程图：<br><img src="/images/live/2d4844429b6c24c5s.png" alt="Markdown"></p>
<h2 id="web中直播技术"><a href="#web中直播技术" class="headerlink" title="web中直播技术"></a>web中直播技术</h2><p>目前互联网上web做直播，主要是展示，主流web展示的话可能涉及到hls跟rtmp这两个东西，现在我们重点讲解hls跟rtmp协议。</p>
<h3 id="HLS"><a href="#HLS" class="headerlink" title="HLS"></a>HLS</h3><p>HLS（HTTP Live Streaming全称）是一个基于 HTTP 的视频流协议，由 Apple 公司实现，Mac OS 上的 QuickTime、Safari 以及 iOS 上的 Safari 都能很好的支持 HLS，高版本 Android 也增加了对 HLS 的支持。一些常见的客户端如：MPlayerX、VLC 也都支持 HLS 协议，如果需要在chrome上播放，需要使用videojs-contrib-hls.js解析。</p>
<p>HLS工作流程：</p>
<p><img src="/images/live/ebf24281ef5b0221s.png" alt="Markdown"></p>
<p>Server :<br>服务器组件负责获取的媒体输入流 , 然后Media编码后 MPEG-4（H.264 video 和 AAC audio）格式然后用硬件打包到 MPEG-2 (MPEG-2 transport stream)的传输流中。图中显示,传输流会经过stream segmenter, 这里的工作是MPEG-2传输流会被分散为小片段然后保存为一个或多个系列的 .ts 格式的媒体文件。这个过程需要借助编码工具来完成，比如 Apple stream segmenter。<br>(视频类是.ts文件,纯音频会被编码为一些音频小片段，通常为 ADTS头的AAC、MP3、或者 AC-3格式。)<br>服务端可以采用硬件编码和软件编码两种形式，其功能都是按照上文描述的规则对现有的媒体文件进行切片并使用索引文件进行管理。而软件切片通常会使用 Apple 公司提供的工具或者第三方的集成工具。</p>
<p>Distribution :<br>同时上面提到的那个切片器（segmenter）也会创建一个索引文件，通常会包含这些媒体文件的一个列表，也能包含元数据。他一般都是一个.M38U 个hi的列表。列表元素会关联一个 URL 用于客户端访问。然后按序去请求这些 URL。</p>
<p>client :<br>分配组件由标准的网络服务器。他们负责接受Client客户端请求并提供相关联的资源给客户端。</p>
<p>索引文件结构图</p>
<p><img src="/images/live/764764-551e7aa6c8f2b86e.png" alt="Markdown"></p>
<p>主索引文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#EXTM3U</span><br><span class="line">#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=409037,RESOLUTION=416x234,CODECS=&quot;mp4a.40.2, avc1.42001e&quot;</span><br><span class="line">Gear1/prog_index.m3u8</span><br></pre></td></tr></table></figure>
<p>#EXTM3U</p>
<p>每个M3U文件第一行必须是这个tag，请标示作用</p>
<p>#EXT-X-STREAM-INF</p>
<p>标签的属性列表中直接指明当前流是VIDEO还是AUDIO</p>
<p>属性 :</p>
<ol>
<li>BANDWIDTH 指定码率</li>
<li>PROGRAM-ID 唯一ID (这个属性在后面的协议版本废除了)</li>
<li>CODECS 指定流的编码类型</li>
<li>RESOLUTION：分辨率</li>
</ol>
<p>子索引：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">#EXTM3U</span><br><span class="line">#EXT-X-TARGETDURATION:11</span><br><span class="line">#EXT-X-VERSION:3</span><br><span class="line">#EXT-X-MEDIA-SEQUENCE:0</span><br><span class="line">#EXT-X-PLAYLIST-TYPE:VOD</span><br><span class="line">#EXTINF:10.133333,</span><br><span class="line">fileSequence0.ts</span><br><span class="line">#EXTINF:10.000666,</span><br><span class="line">fileSequence1.ts</span><br><span class="line">#EXTINF:10.667334,</span><br><span class="line">fileSequence2.ts</span><br><span class="line">#EXTINF:9.686001,</span><br><span class="line">fileSequence3.ts</span><br><span class="line">#EXTINF:9.768665,</span><br><span class="line">fileSequence4.ts</span><br><span class="line">#EXTINF:10.000000,</span><br><span class="line">fileSequence5.ts</span><br><span class="line">#EXT-X-ENDLIST</span><br></pre></td></tr></table></figure>
<p>#EXTM3U   m3u文件头，必须放在第一行 </p>
<p>#EXT-X-TARGETDURATION  每个分片TS的最大的时长 </p>
<p>#EXT-X-VERSION   用以标示协议版本<br>#EXT-X-MEDIA-SEQUENCE  TS分片的序列号<br>#EXT-X-PLAYLIST-TYPE  提供关于PlayList的可变性的信息， 这个对整个PlayList文件有效，是可选的<br>#EXTINF  extra info，分片TS的信息，如时长，带宽等</p>
<p>说明</p>
<ul>
<li>主索引文件和子索引文件都是.M3U8的playlist</li>
<li>主索引文件只需下载一次，但对于直播节目子索引文件定期重新加载</li>
</ul>
<p>videojs-contrib-hls解析过程</p>
<p><img src="/images/live/aed1d13465cd5422s.png" alt="Markdown"></p>
<p>HLS简单讲就是把整个流分成一个个小的，基于 HTTP 的文件来下载，每次只下载一些，前面提到了用于 H5 播放直播视频时引入的一个 .m3u8 的文件，这个文件就是基于 HLS 协议，存放视频流元数据的文件。 每一个 .m3u8 文件，分别对应若干个 ts 文件，这些 ts 文件才是真正存放视频的数据，m3u8 文件只是存放了一些 ts 文件的配置信息和相关路径，当视频播放时，.m3u8 是动态改变的，再通过解析器（videojs-contrib-hls.js）解析这个文件，并找到对应的 ts 文件来播放，所以一般为了加快速度，.m3u8 放在 web 服务器上，ts 文件放在 cdn 上。</p>
<h3 id="RTMP"><a href="#RTMP" class="headerlink" title="RTMP"></a>RTMP</h3><p>Real Time Messaging Protocol（简称 RTMP）是 Macromedia 开发的一套视频直播协议，现在属于 Adobe。这套方案需要搭建专门的 RTMP 流媒体服务如 Adobe Media Server，并且在浏览器中只能使用 Flash 实现播放器。它的实时性非常好，延迟很小，但无法支持移动端 WEB 播放是它的硬伤。</p>
<p>浏览器端，HTML5 video标签无法播放 RTMP 协议的视频，可以通过 video.js 来实现。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">&lt;link href=&quot;http://vjs.zencdn.net/5.8.8/video-js.css&quot; rel=&quot;stylesheet&quot;&gt;</span><br><span class="line"> </span><br><span class="line">&lt;video id=&quot;example_video_1&quot; class=&quot;video-js vjs-default-skin&quot; controls preload=&quot;auto&quot; width=&quot;640&quot; height=&quot;264&quot; loop=&quot;loop&quot; webkit-playsinline&gt;</span><br><span class="line">&lt;source src=&quot;rtmp://10.14.221.17:1935/rtmplive/home&quot; type=&apos;rtmp/flv&apos;&gt;</span><br><span class="line">&lt;/video&gt;</span><br><span class="line"> </span><br><span class="line">&lt;script src=&quot;http://vjs.zencdn.net/5.8.8/video.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">&lt;script&gt;</span><br><span class="line">videojs.options.flash.swf = &apos;video.swf&apos;;</span><br><span class="line">videojs(&apos;example_video_1&apos;).ready(function() &#123;</span><br><span class="line">this.play();</span><br><span class="line">&#125;);</span><br><span class="line">&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<h3 id="hls与RTMP对应"><a href="#hls与RTMP对应" class="headerlink" title="hls与RTMP对应"></a>hls与RTMP对应</h3><table>
<thead>
<tr>
<th>协议</th>
<th>原理</th>
<th>延时</th>
<th>优点</th>
<th>缺点</th>
<th>使用场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>HLS(http)</td>
<td>集合一段时间数据生成ts切片文件更m3u8文件</td>
<td>10s-30s</td>
<td>跨平台</td>
<td>延时性高</td>
<td>移动端</td>
</tr>
<tr>
<td>RTMP(TCP)</td>
<td>每个时刻的数据收到后立即发送</td>
<td>2s</td>
<td>延时低、实时性好</td>
<td>跨平台差</td>
<td>PC+直播+实时性要求高+互动性强</td>
</tr>
</tbody>
</table>
<h2 id="实践（搭建RTMP、HLS直播流服务）"><a href="#实践（搭建RTMP、HLS直播流服务）" class="headerlink" title="实践（搭建RTMP、HLS直播流服务）"></a>实践（搭建RTMP、HLS直播流服务）</h2><h3 id="安装nginx"><a href="#安装nginx" class="headerlink" title="安装nginx"></a>安装nginx</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">brew install nginx</span><br></pre></td></tr></table></figure>
<h3 id="安装nginx-rtmp-module"><a href="#安装nginx-rtmp-module" class="headerlink" title="安装nginx-rtmp-module"></a>安装nginx-rtmp-module</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">brew install nginx-full --with-rtmp-module</span><br></pre></td></tr></table></figure>
<p>安装FFmpeg（是一个集录制、转换、音/视频编码解码功能 为一体的完整的开源工具，我们下面用它来做推流跟切片）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">brew install ffmpeg</span><br></pre></td></tr></table></figure>
<h3 id="nginx-conf配置文件，配置RTMP、HLS"><a href="#nginx-conf配置文件，配置RTMP、HLS" class="headerlink" title="nginx.conf配置文件，配置RTMP、HLS"></a>nginx.conf配置文件，配置RTMP、HLS</h3><p>查找到nginx.conf配置文件（/usr/local/etc/nginx/nginx.conf）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">rtmp &#123;</span><br><span class="line">	server &#123;</span><br><span class="line">		#监听的端口</span><br><span class="line">		listen 1935;</span><br><span class="line">		# RTMP 直播流配置</span><br><span class="line">		application rtmplive &#123;</span><br><span class="line">			live on;</span><br><span class="line">			#为 rtmp 引擎设置最大连接数。默认为 off</span><br><span class="line">			max_connections 1024;</span><br><span class="line">		&#125;</span><br><span class="line">		# HLS 直播流配置</span><br><span class="line">		application hls&#123;</span><br><span class="line">			live on;</span><br><span class="line">			hls on;</span><br><span class="line">			hls_path /Users/tony/Documents/notes/live/public/hls;  #这里的路径切片需要保存的路径</span><br><span class="line">			hls_fragment 1s;</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在http中添加 hls 的配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">location /hls &#123;</span><br><span class="line">	# Serve HLS fragments</span><br><span class="line">	types &#123;</span><br><span class="line">		application/vnd.apple.mpegurl m3u8;</span><br><span class="line">		video/mp2t ts;</span><br><span class="line">	&#125;</span><br><span class="line">	root /Users/tony/Documents/notes/live/public;#切片的路径</span><br><span class="line">	#add_header Cache-Controll no-cache;</span><br><span class="line">	expires -1;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="重启nginx"><a href="#重启nginx" class="headerlink" title="重启nginx"></a>重启nginx</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo nginx -s reload</span><br></pre></td></tr></table></figure>
<h3 id="查看端口是否启动"><a href="#查看端口是否启动" class="headerlink" title="查看端口是否启动"></a>查看端口是否启动</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">netstat -an | grep 1935</span><br></pre></td></tr></table></figure>
<p>如果显示如下，显示已经启用</p>
<p><img src="/images/live/edf1708baf6fbc90s.png" alt="Markdown"></p>
<p>http端口同理</p>
<p>到现在我们已经完成了，服务的搭建（rtmp、hls推流地址分别为:rtmp://127.0.0.1:1935/rtmplive/home,rtmp://localhost:1935/rtmplive/hls）</p>
<h3 id="FFmpeg执行命令"><a href="#FFmpeg执行命令" class="headerlink" title="FFmpeg执行命令"></a>FFmpeg执行命令</h3><p>我们以推流MP4文件为例，我的视频文件地址：/Users/tony/Desktop/w01661pl9vw.p702.1.mp4 </p>
<p>RTMP 协议推流命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ffmpeg -re -i /Users/tony/Desktop/w01661pl9vw.p702.1.mp4 -vcodec libx264 -acodec aac -f flv rtmp://127.0.0.1:1935/rtmplive/home</span><br></pre></td></tr></table></figure>
<p>HLS 协议推流命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ffmpeg -re -i  /Users/tony/Desktop/w01661pl9vw.p702.1.mp4 -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -q 10 rtmp://127.0.0.1:1935/hls/test</span><br></pre></td></tr></table></figure>
<p>/Users/tony/Desktop/w01661pl9vw.p702.1.mp4 表示视频的地址</p>
<p>rtmp://127.0.0.1:1935/rtmplive/home、rtmp://localhost:1935/rtmplive/hls表示推流地址</p>
<p>上面的命令操作后，命令行出现了如下图，表示已经成功了</p>
<p><img src="/images/live/WX20180126-111328@2x.png" alt="Markdown"></p>
<p>关于FFmpeg功能命令可参考：</p>
<p><a href="http://www.jianshu.com/p/053665062f22" target="_blank" rel="noopener">FFmpeg功能命令集合</a></p>
<h3 id="代码实现"><a href="#代码实现" class="headerlink" title="代码实现"></a>代码实现</h3><p>两种推流方式播放的话，我们都使用video.js播放器播放(牛牛里使用的是腾讯云播放器)</p>
<p>rtmp</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line">&lt;!DOCTYPE html&gt;</span><br><span class="line">&lt;html&gt;</span><br><span class="line">&lt;head&gt;</span><br><span class="line">&lt;meta charset=&quot;UTF-8&quot;&gt;</span><br><span class="line">&lt;title&gt;Insert title here&lt;/title&gt;</span><br><span class="line">&lt;link href=&quot;http://vjs.zencdn.net/5.19/video-js.min.css&quot; rel=&quot;stylesheet&quot;&gt;</span><br><span class="line">&lt;script src=&quot;http://vjs.zencdn.net/5.19/video.min.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">&lt;/head&gt;</span><br><span class="line">&lt;body&gt;</span><br><span class="line">&lt;video</span><br><span class="line">    id=&quot;my-player&quot;</span><br><span class="line">    class=&quot;video-js&quot;</span><br><span class="line">    controls</span><br><span class="line">    preload=&quot;auto&quot;</span><br><span class="line">    data-setup=&apos;&#123;&#125;&apos;&gt;</span><br><span class="line">    &lt;source src=&apos;rtmp://127.0.0.1/rtmplive/home&apos; type=&apos;rtmp/flv&apos;/&gt;  </span><br><span class="line">  &lt;/p&gt;</span><br><span class="line">&lt;/video&gt;</span><br><span class="line">&lt;script type=&quot;text/javascript&quot;&gt;</span><br><span class="line">   var player = videojs(&apos;my-player&apos;);</span><br><span class="line">   var options = &#123;&#125;;</span><br><span class="line"></span><br><span class="line">   var player = videojs(&apos;my-player&apos;, options, function onPlayerReady() &#123;</span><br><span class="line">     videojs.log(&apos;Your player is ready!&apos;);</span><br><span class="line">     // In this context, `this` is the player that was created by Video.js.</span><br><span class="line">     this.play();</span><br><span class="line">     // How about an event listener?</span><br><span class="line">     this.on(&apos;ended&apos;, function() &#123;</span><br><span class="line">       videojs.log(&apos;Awww...over so soon?!&apos;);</span><br><span class="line">     &#125;);</span><br><span class="line">   &#125;);</span><br><span class="line"></span><br><span class="line">&lt;/script&gt;</span><br><span class="line">&lt;/body&gt;</span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>
<p>其它src中的地址填的是RTMP推流地址，注意播放时，如果出现“当前系统环境不支持播放该视频格式”，浏览器需要启用flash，才能正常播放。</p>
<p>hls</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">&lt;!DOCTYPE html&gt;</span><br><span class="line">&lt;html&gt;</span><br><span class="line">&lt;head&gt;</span><br><span class="line">&lt;meta charset=utf-8 /&gt;</span><br><span class="line">&lt;title&gt;videojs-contrib-hls embed&lt;/title&gt;</span><br><span class="line">  &lt;link href=&quot;https://unpkg.com/video.js/dist/video-js.css&quot; rel=&quot;stylesheet&quot;&gt;</span><br><span class="line">  &lt;script src=&quot;https://unpkg.com/video.js/dist/video.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">  &lt;script src=&quot;https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">&lt;/head&gt;</span><br><span class="line">&lt;body&gt;</span><br><span class="line"></span><br><span class="line">  &lt;video id=&quot;my_video_1&quot; class=&quot;video-js vjs-default-skin&quot; controls preload=&quot;auto&quot; width=&quot;640&quot; height=&quot;268&quot; </span><br><span class="line">  data-setup=&apos;&#123;&#125;&apos;&gt;</span><br><span class="line">    &lt;source src=&quot;http://www.tony.com/hls/test.m3u8&quot; type=&quot;application/x-mpegURL&quot;&gt;</span><br><span class="line">  &lt;/video&gt;</span><br><span class="line">  </span><br><span class="line">  &lt;script&gt;</span><br><span class="line">  &lt;/script&gt;</span><br><span class="line">  </span><br><span class="line">&lt;/body&gt;</span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>
<p>src填的是切片地址</p>
<h3 id="效果"><a href="#效果" class="headerlink" title="效果"></a>效果</h3><p>rtmp效果</p>
<p><img src="/images/live/0b20b027406625d2s.png" alt="Markdown"></p>
<p>hls效果</p>
<p><img src="/images/live/fbd49eed2bd3f92es.png" alt="Markdown"></p>
<p>ts和m3u8文件</p>
<p><img src="/images/live/14e622f03c4a9193s.png" alt="Markdown"></p>
<h2 id="直播中遇到问题"><a href="#直播中遇到问题" class="headerlink" title="直播中遇到问题"></a>直播中遇到问题</h2><ul>
<li>自动播放问题</li>
<li>各平台播放器表现不统一</li>
<li>内页面调试困难</li>
<li>Native与web通信问题</li>
</ul>
<h3 id="自动播放问题"><a href="#自动播放问题" class="headerlink" title="自动播放问题"></a>自动播放问题</h3><p>在X5内核浏览器里必须使用触发touchend、click、doubleclick或 keydown 事件等标准的事件才能触发</p>
<h3 id="各平台播放器表现不统一"><a href="#各平台播放器表现不统一" class="headerlink" title="各平台播放器表现不统一"></a>各平台播放器表现不统一</h3><p>安卓下很多浏览器把video标签替换成了原生自带播放器样式跟行为，很难控制其行为跟样式。</p>
<h3 id="内嵌页面调试困难"><a href="#内嵌页面调试困难" class="headerlink" title="内嵌页面调试困难"></a>内嵌页面调试困难</h3><p>目前使用的是weinre调试，但weinre调试看不到在native实际效果，比如web调用native，需要native反馈一种效果，weinre是看不到效果。</p>
<h3 id="Native与web通信"><a href="#Native与web通信" class="headerlink" title="Native与web通信"></a>Native与web通信</h3><p>schema跟jsBridge，schema只能做到web调用native，而且做不到native调用web；jsBridge虽然可以做native调用web，但在iframe没加载完的情况下，也是通知不到web的；</p>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>整个直播是一个非常复杂的过程，实现过程中会遇到很多性能问题，需要在性能跟即时性做一个权衡，ts跟m3u8尽量做到缓存，浏览器里尽量使用推流。</p>
<p>参考资料：</p>
<p><a href="https://www.zhihu.com/question/42162310" target="_blank" rel="noopener">如何搭建一个完整的视频直播系统？</a></p>
<p><a href="http://web.jobbole.com/88543/" target="_blank" rel="noopener">H5直播起航</a></p>
<p><a href="https://www.zhihu.com/question/21087379" target="_blank" rel="noopener">有支持M3U8格式的HTML5播放器吗？</a></p>
<p><a href="http://www.jianshu.com/p/2ce402a485ca" target="_blank" rel="noopener">HTTP Live Streaming (HLS) - 概念
</a></p>
<p><a href="http://www.eduve.org/knowledge/732" target="_blank" rel="noopener">M3U8格式讲解及实际应用分析
</a></p>
<p>作者：<a href="https://github.com/fttony" target="_blank" rel="noopener">Tony</a></p>
      
    </div>
    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center">
  <div>Donate comment here</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="Tony 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="Tony 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/直播/" rel="tag"># 直播</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/10/06/深入理解 Promise (上)/" rel="next" title="深入理解 Promise (上)">
                <i class="fa fa-chevron-left"></i> 深入理解 Promise (上)
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/04/07/web安全——XSS/" rel="prev" title="web安全——XSS">
                web安全——XSS <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Tony</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives">
              
                  <span class="site-state-item-count">65</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">18</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">3</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#内容"><span class="nav-number">1.</span> <span class="nav-text">内容</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#直播构成（使用角色）"><span class="nav-number">2.</span> <span class="nav-text">直播构成（使用角色）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#直播流程"><span class="nav-number">3.</span> <span class="nav-text">直播流程</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#web中直播技术"><span class="nav-number">4.</span> <span class="nav-text">web中直播技术</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#HLS"><span class="nav-number">4.1.</span> <span class="nav-text">HLS</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#RTMP"><span class="nav-number">4.2.</span> <span class="nav-text">RTMP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#hls与RTMP对应"><span class="nav-number">4.3.</span> <span class="nav-text">hls与RTMP对应</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#实践（搭建RTMP、HLS直播流服务）"><span class="nav-number">5.</span> <span class="nav-text">实践（搭建RTMP、HLS直播流服务）</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#安装nginx"><span class="nav-number">5.1.</span> <span class="nav-text">安装nginx</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装nginx-rtmp-module"><span class="nav-number">5.2.</span> <span class="nav-text">安装nginx-rtmp-module</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#nginx-conf配置文件，配置RTMP、HLS"><span class="nav-number">5.3.</span> <span class="nav-text">nginx.conf配置文件，配置RTMP、HLS</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#重启nginx"><span class="nav-number">5.4.</span> <span class="nav-text">重启nginx</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看端口是否启动"><span class="nav-number">5.5.</span> <span class="nav-text">查看端口是否启动</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#FFmpeg执行命令"><span class="nav-number">5.6.</span> <span class="nav-text">FFmpeg执行命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#代码实现"><span class="nav-number">5.7.</span> <span class="nav-text">代码实现</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#效果"><span class="nav-number">5.8.</span> <span class="nav-text">效果</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#直播中遇到问题"><span class="nav-number">6.</span> <span class="nav-text">直播中遇到问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#自动播放问题"><span class="nav-number">6.1.</span> <span class="nav-text">自动播放问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#各平台播放器表现不统一"><span class="nav-number">6.2.</span> <span class="nav-text">各平台播放器表现不统一</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内嵌页面调试困难"><span class="nav-number">6.3.</span> <span class="nav-text">内嵌页面调试困难</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Native与web通信"><span class="nav-number">6.4.</span> <span class="nav-text">Native与web通信</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#总结"><span class="nav-number">7.</span> <span class="nav-text">总结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Tony</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  



  
  









  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three-waves.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>